package demo.set;

import java.util.Comparator;

public class AgeComparator implements Comparator<Test> {

	@Override
	public int compare(Test o1, Test o2) {
		if (o1.age > o2.age) {
			return 1;
		} else if (o1.age < o2.age) {
			return -1;

		} else
			return 0;
	}

}
